from rest_framework import serializers

from purchase.models import Purchase


class PurchaseSerializer(serializers.ModelSerializer):

    class Meta:
        model = Purchase
        fields = ['id', 'staff', 'order_id', 'sku_id', 'email', 'asin', 'image_url', 'color_size', 'chinese_node', 'sell_price',
                  'pick_price', 'road_price', 'weight', 'numbers', 'abroad_price', 'principal', 'profit',
                  'pick_goods_url', 'create_time',]


class PurchaseUpdateSerializer(serializers.ModelSerializer):

    class Meta:
        model = Purchase
        fields = ['id', 'staff', 'order_id', 'sku_id', 'email', 'asin', 'image_url', 'color_size', 'chinese_node', 'sell_price',
                  'pick_price', 'road_price', 'weight', 'numbers', 'abroad_price', 'principal', 'profit',
                  'pick_goods_url', 'create_time',]

